﻿<!DOCTYPE html>
<html lang="en">
<head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="format-detection" content="telephone=no">
        <title>注册 - K K彩票网</title>
        <meta name="Keywords" content="">
        <meta name="Description" content="">
        <link rel="stylesheet" href="login/css/layer.css">
        <link href="login/css/loginstyle.css" rel="stylesheet">
        <link type="text/css" href="login/static/lib/remodal-1.1.0/remodal.min.css" rel="stylesheet">
    
        <script src="login/js/jquery-1.11.3.min.js"></script>
        <script src="../public/all/js/jquery.cookie.js"></script>
        <script src="login/js/kk.min.js"></script>
    
        <!-- debug only -->
        <script src="login/js/layer.min.js"></script>
        <script src="login/static/lib/jquery.cycle.all.min.js"></script>
        <script src="../public/all/js/context.js"></script>
        <script src="../public/all/js/util.js"></script>
        <script src="../public/all/js/cmd.js"></script>
        <script src="../public/all/js/classify.js"></script>
        <script src="login/js/core.js"></script>
        <!-- debug only end -->
    </head>
<body>
    <div class="minbox">
        <span class="el-2"></span>
        <span class="el-3"></span>
        <div class="wrapper">
            <span class="el-1"></span>
            <!-- header -->
            <div class="header">
                <div class="logo">
                    <object id="FlashA" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="252" height="87" class="flash">
                        <param name="movie" value="login/img/reglogo.swf">
                        <param name="quality" value="high">
                        <param name="wmode" value="transparent">
                        <param name="swfversion" value="6.0.65.0">
                        <!--[if !IE]>-->
                        <object type="application/x-shockwave-flash" data="login/img/reglogo.swf" width="252" height="87">
                            <!--<![endif]-->
                            <param name="quality" value="high">
                            <param name="wmode" value="transparent">
                            <param name="swfversion" value="6.0.65.0">
                            <!--[if !IE]>-->
                        </object>
                        <!--<![endif]-->
                    </object>
                </div>
                <div class="notice">
                    <h2>最新公告：</h2>
                    <div class="cont" id="noticeDom">
                    <marquee onclick="popNotice(this)" direction="left" scrollamount="4" onmouseover="this.stop()" onmouseout="this.start()">
                        欢迎来到K K彩票网！
                    </marquee></div>
                </div>
            </div>
            <div style="width: 1000px; margin: 0  auto; overflow: hidden;">
                <img src="login/img/toubu.png"></div>
            <div class="kaihubg cur" style="display: block;">
                <div class="kaihu">
                    <div class="kaihuin">
                        <div class="kaihutl">请在以下填写您的注册信息</div>
                        <div class="cl h28"></div>
                            <table class="zhucetable">
                                <tbody>
                                    <tr id="recoTr" class="hide">
                                        <td width="102">
                                            <div class="tar f15">推荐人账号：</div>
                                        </td>
                                        <td width="">
                                            <input size="40" id="reg_referee" maxlength="15" class="zucenpt" type="text"> <span class="pl8 f15">可选填</span></td>
                                    </tr>
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">会员账号：</div>
                                        </td>
                                        <td width="">
                                            <input size="40" id="reg_username" maxlength="15" class="validate[required,minSize[6],maxSize[15]] zucenpt" type="text"> <span class="pl8 f15">账号规则：账号必须为6-15为数字和字母组合</span></td>
                                    </tr>
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">登陆密码：</div>
                                        </td>
                                        <td width="">
                                            <input id="reg_password" maxlength="20" size="40" class="validate[required,minSize[6],maxSize[20]] zucenpt" type="password"> <span class="pl8 f15">密码规则：密码长度要有6-20个字符，以及必须含有数字和字母组合</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">确认密码：</div>
                                        </td>
                                        <td width="">
                                            <input id="reg_password1" maxlength="20" size="40" class="validate[required,equals[regPassword]] zucenpt" type="password"> <span class="pl8 f15">确定密码</span></td>
                                    </tr>
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">真实姓名：</div>
                                        </td>
                                        <td width="">
                                            <input id="reg_name" size="40" maxlength="10" class="validate[required] zucenpt"> <span class="pl8 f15">姓名必须与你用于提款的银行户口名字一致，否则无法提款</span></td>
                                    </tr>
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">取款密码：</div>
                                        </td>
                                        <td width="">
                                            <div class="select" id="reg_take_password">
                                                <select>
                                                    <option value="0">0</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>
                                                    <option value="9">9</option>
                                                </select>
                                                <select id="pwd2">
                                                    <option value="0">0</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>
                                                    <option value="9">9</option>
                                                </select>
                                                <select id="pwd3">
                                                    <option value="0">0</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>
                                                    <option value="9">9</option>
                                                </select>
                                                <select id="pwd4">
                                                    <option value="0">0</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>
                                                    <option value="9">9</option>
                                                </select>
                                            </div>
                                            <span class="pl8 f15">提款认证必须，务必记住</span>
                                        </td>
                                    </tr>
                                    <tr class="hide" style="display: table-row;">
                                        <td width="102">
                                            <div class="tar f15">QQ账号：</div>
                                        </td>
                                        <td width="">
                                            <input id="qq" size="40" maxlength="30" class="validate[required,custom[email],minSize[4]] zucenpt" type="text"> <span class="pl8 f15">填写常用QQ账号</span>
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td width="102">
                                            <div class="tar f15">&nbsp;</div>
                                        </td>
                                        <td width="">
                                            <input type="submit" name="regBtn" class="subbtn fl mr12 do-register" value="">
                                            <a href="#" class="wydeng" id="login-index">我要登录</a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body></html>

<script>
    // 填入代理
    if (urlInfo.params.referee) {
        $("#reg_referee").val(urlInfo.params.referee);
    }
    
    $(".do-register").click(function() {
        // 提交注册
        var referee = $("#reg_referee").val().trim();
        var account = $("#reg_username").val().trim();
        var p1 = $("#reg_password").val().trim();
        var p2 = $("#reg_password1").val().trim();
        var name = $("#reg_name").val().trim();
        var p3 = "";
        var qq = $("#qq").val().trim();
        var arr = $("#reg_take_password select");
        for (var i = 0; i < arr.length; i++) {
            p3 += $(arr[i]).val();
        }

        if (account == "") {
            alert("账号名称不能为空");
            $("#reg_username").focus();
            return false;
        }
        if (! /^[0-9a-zA-Z]{6,15}$/.test(account)) {
            alert("用户名6~15位数字或字母");
            $("#reg_username").focus();
            return false;
        }
        if (!p1) {
            alert("密码不能为空");
            $("#reg_password").focus();
            return false;
        }
        if (p1.length > 20) {
            alert("密码不能大于20个字符。");
            $("#reg_password").focus();
            return false;
        }
        if (p1.length < 6) {
            alert("密码不能小于6个字符。");
            $("#reg_password").focus();
            return false;
        }
        if (p1 != p2) {
            alert("输入的密码不一致，请重新输入。");
            $("#reg_password1").focus();
            return false;
        }
        
        if (!name) {
            aler2("真实姓名不能为空");
            $("#reg_name").focus();
            return false;
        }
        if (!/^[\u4E00-\u9FA5]{2,8}$/.test(name)) {
            alert("请输入正确的真实姓名");
            $("#reg_name").focus();
            return false;
        }

        if (!qq) {
			alert("请输入联系QQ号码");
            $("#reg_qq").focus();
			return false;
		}
		if (!/^[0-9]{6,20}$/.test(qq)) {
            alert("请输入正确的QQ号码");
            $("#reg_qq").focus();
            return false;
        }

        urlInfo.params.try = 0;
        CMD.register(account, p1, name, "", referee, "pc", function(r) {
            CMD.modify_user_info(null, {
                tpassword: p3,
                qq: qq,
            }, function() {
                Util.jumpUrl({
                    file: "agreement.html"
                });
            });
        }, function(r) {
            if (r) {
                r = r.replace("手机号", "账号");
                alert("注册失败，原因：" + r);
            }
            else alert("注册失败！");
        })
        return false;
    })

    $("#login-index").click(function() {
        Util.jumpUrl({
            file: "index.html"
        })
    })
</script>